% \iffalse meta-comment
%
% This file is part of the uhthesis latex class. It is based partially on the
% dtx tutorial by Scott Pakin (Copyright 2004) and the uhthesis2e class file by
% Carleton A. Moore and Robert S. Brewer (Copyright 1998). Additional changes by
% Mark L. Stillwell (Copyright 2008).
%
% This program is free software: you can redistribute it and/or modify it under
% the terms of the GNU General Public License as published by the Free Software
% Foundation, either version 3 of the License, or (at your option) any later
% version.

% This program is distributed in the hope that it will be useful, but WITHOUT
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
% FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License along with
% this program.  If not, see <http://www.gnu.org/licenses/>.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{uhthesis.dtx}[2015/03/07 v2.1.0 uhthesis.dtx file]
%</driver>
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{uhthesis}
%<class>    [2015/03/07 v2.1.0 uhthesis class]
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{url}
\EnableCrossrefs         
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{uhthesis.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{386}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \changes{v0.1}{2008/10/28}{Initial version, not for public release}
% \changes{v2.0.0}{2012/04/10}{Beta release, use at own risk. Version bumped so
% it will be higher than the version of old uhthesis2e class, to avoid
% confusion}
% \changes{v2.1.0}{2015/03/07}{Revisions to comply with Sep 2010 Style \& Policy
% guide}
%
% \GetFileInfo{uhthesis.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
% \title{The \textsf{uhthesis} class\thanks{This document corresponds to
%   \textsf{uhthesis}~\fileversion, dated \filedate.}}
% \author{Mark Stillwell \\ \texttt{markls@hawaii.edu} \and
%         Robert S. Brewer \\ \texttt{rbrewer@hawaii.edu}}
%
% \maketitle
%
% \section{Introduction}
%
% This file is the main file for the uhthesis class, which is intended to meet 
% the requirements for University of Hawai`i at M\=anoa Masters theses and Ph.D.
% dissertations.
%                        
% This document class is based on the ``Style and Policy Manual For Theses and
% Dissertations'' provided by the University of Hawai`i Graduate Division. The
% version used states ``September 2010'' on the title
% page~\cite{uhthesisstyle2010}. Note that the most recent version of the style
% guide is dated ``September 2014''~\cite{uhthesisstyle2014} and this style
% has not been updated for that yet!
%
% The following pages must appear in the following order and have lower case
% Roman numeral page numbers, only the title page is
% unnumbered~\cite[p. 5]{uhthesisstyle2010}:
%
% \begin{itemize}
%   \item title page
%   \item copyright page  (optional)
%   \item dedication page (optional)
%   \item acknowledgements (optional)
%   \item abstract
%   \item table of contents
%   \item list of tables (if any)
%   \item list of figures/illustrations/graphs/charts/maps/plates (if any)
%   \item list of abbreviations and symbols (optional)
%   \item preface (optional)
% \end{itemize}
%
% Text and other pages following preliminary pages are numbered using Arabic
% numerals and must appear in the following
% order~\cite[p. 5]{uhthesisstyle2010}:
% \begin{itemize}
%   \item text (chapters of the manuscript, including tables and figures)
%   \item appendices (if any)
%   \item notes (if any)
%   \item glossary (optional)
%   \item bibliography/references
%   \item index (optional)
% \end{itemize}
%
% There are a number of formatting requirements listed in the style guide which
% are already addressed by \LaTeX either directly or through the report document
% class upon which this class is based. Care should be taken to insure that
% formatting changes made by authors do not violate the following requirements:
% \begin{itemize}
%   \item headings and subheadings must be consistent
%   \item every page should be counted in the numbering
%   \item no text or marks around page numbers, no slash through zeros in page 
%         numbers
%   \item 10 point or larger font
% \end{itemize}
%
% Some of the requirements in the style guide cannot be properly addressed
% within the uhthesis document class. Authors should take care to ensure that
% the following requirements are met by their document:
% \begin{itemize}
%   \item organized into either sections or chapters.
%   \item if organized in chapters, each chapter must be titled and begin on a
%         new page
%   \item appendices may include schedules, lists, questionnaires, test, forms,
%         case studies, series of plates and figures, etc., and each type of
%         material forms a separate appendix which must be labelled separately
%   \item the bibliography should be a style that is professionally acceptable 
%         within the field
%   \item only references used in the preparation of the thesis/dissertation should
%         be included in the bibliography
%   \item consistent use and formatting of foreign words; italics or underlining is
%         recommended. A quotation entirely in a foreign language should only
%         appear in quotation marks and not be italicized or underlined.
%   \item commas and periods should be placed within quotation marks
%   \item i.e. and e.g. should always be followed by commas
% \end{itemize}
%
%
%appendices:
%
%other formatting reqs:
%-- page numbers either at top right or centered 1 inch from bottom
%-- major headings (acknowledgements, abstract, toc, list of tables, list of
%figures, preface, chapter headings, appendices, and biography) should appear
%centered at the top of a new page immediately followed by the text. chapter
%headings only appear on the first page of a new chapter.
%-- minor headings: each subheading level must be distinguished by a different
%style, headings at the same sublevel must use the same style consistently
%throughout the work, subheadings should not begin on a new page unless the
%previous section ended at the bottom of a page.
%-- whitespace between words must be approximately even, and so full
%justification is not recommended.
%-- use of Hawaiian words should be consistent
%-- 1.5 spacing except where required otherwise~\cite[p. 10]{uhthesisstyle2010}
%-- no widows or orphans
%-- no more than 3 hyphenations at the end of a line per page
%-- no more than two consecutive lines with hyphens at the end.
%-- every page should be numbered except the title and cover pages for parts
%-- print on one side of page only
%-- 8.5x11 in
%
%tables:
%-- "Table" then a number, then a period, followed by caption and then contents
%on next line
%-- title can be flush left or centered, but must be consistent
%-- can be all caps or mixed, but must be consistent
%-- tables over half a page in length should appear on a separate page
%-- wide tables may be placed broadside with title on binding side
%-- tables may cover a number of pages in which case put " (Continued)" between
%period and caption
%-- footnotes should use symbols or letters, but not numbers and be placed at the
%bottom of the table rather than the bottom of the page
%
%figures:
%-- captions should appear below, even if figure is broadside
%-- positioning rules are the same as those for tables
%-- if rotated, top toward binding
%
%maps:
%-- maps should have an accurate bar-type scale, some indication of lat \& long,
%and a northward pointing arrow
%
% \section{Usage}
%
% Put text here.
%
% \DescribeEnv{abstract}
% abstract
%
% \StopEventually{\PrintChanges\PrintIndex}
%
% \section{Implementation}
%
% This class loads the standard report class after making some changes to the
% options. The twocolumn option is specifically disabled and a warning message
% will be printed if it is specified.
% 
%    \begin{macrocode}
\newcommand{\@onehalfspacingp}{false}
\newcommand{\@draftp}{false}
\newcommand{\@englishp}{false}
\newcommand{\@letterpaperp}{false}
\newcommand{\@proposalp}{false}
\newcommand{\@thesisp}{false}
\newcommand{\@twosidep}{false}
\DeclareOption{actual}{}
\DeclareOption{dissertation}{}
\DeclareOption{onehalfspacing}{
    \renewcommand{\@onehalfspacingp}{true}
    \PassOptionsToPackage{\CurrentOption}{setspace}
}
\DeclareOption{draft}{
    \renewcommand{\@draftp}{true}
    \PassOptionsToClass{\CurrentOption}{report}
}
\DeclareOption{english}{\renewcommand{\@englishp}{true}}
\DeclareOption{hawaiian}{
    \ClassErrorNoLine{uhthesis}
        {The ``hawaiian'' option is not supported at this time}}
\DeclareOption{letterpaper}{
    \renewcommand{\@letterpaperp}{true}
    \PassOptionsToClass{\CurrentOption}{report}
}
\DeclareOption{proposal}{\renewcommand{\@proposalp}{true}}
\DeclareOption{singlespacing}{\PassOptionsToPackage{\CurrentOption}{setspace}}
\DeclareOption{subfigure}{\PassOptionsToPackage{\CurrentOption}{tocloft}}
\DeclareOption{thesis}{\renewcommand{\@thesisp}{true}}
\DeclareOption{dissertation}{\renewcommand{\@thesisp}{false}}
\DeclareOption{twocolumn}{
    \OptionNotUsed
    \ClassWarningNoLine{uhthesis}{This class does not support the two column format}
}
\DeclareOption{twoside}{
    \renewcommand{\@twosidep}{true}
    \PassOptionsToClass{\CurrentOption}{report}
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ExecuteOptions
    {11pt,actual,onehalfspacing,letterpaper,onecolumn,oneside,final,thesis}
\ProcessOptions\relax
\LoadClass[onecolumn]{report}
%    \end{macrocode}
%
% The class will emit warnings if the selected options are not compatible with
% the requirements of the Graduate Division. twoside, single spacing and paper
% formats other than letter are only allowed in draft
% mode~\cite{uhthesisstyle2010}.
%
%    \begin{macrocode}
\RequirePackage{ifthen}
\ifthenelse{\boolean{\@draftp}}{}{
    \ifthenelse{\boolean{\@onehalfspacingp}}{}{
        \ClassWarningNoLine{uhthesis}{final drafts should be 1.5 spaced}
    }
    \ifthenelse{\boolean{\@letterpaperp}}{}{
        \ClassWarningNoLine{uhthesis}
            {final drafts should be printed on letter paper}
    }
    \ifthenelse{\boolean{\@twosidep}}{
        \ClassWarningNoLine{uhthesis}
            {final drafts should be printed on only one side}
    }{}
}
%    \end{macrocode}
%
% Margins are one-inch except on the binding side. The margin on the binding
% side is required to be 1.5 inches to ensure that no portion of the thesis is
% cut off during binding~\cite[p. 8]{uhthesisstyle2002}. We use the
% \emph{includefoot} option to ensure that the page numbers fall within the
% margins of the page, as required~\cite[p. 8]{uhthesisstyle2002}.
%
% FIXME: maybe we should pass the twoside option to geometry when set by the
% user.
%
%    \begin{macrocode}
\RequirePackage[left=1.5in, right=1.0in, top=1.0in, bottom=1.0in,
    includefoot]{geometry}
%    \end{macrocode}
%
% The setspace package is used to control line spacing.
%
%    \begin{macrocode}
\RequirePackage{setspace}
%    \end{macrocode}
%
% This document style was created for documents prepared in the English language.
% The Graduate Division specifies that dissertations may be in either English or
% Hawaiian, so we allow for the replacement of English labels and headings. If
% anyone is interested in making this style compatible with the Hawaiian
% language, please contact the authors.
%
% Other English words that need replacement can be found in the macro
% supporting the title page.
%
% FIXME: In the future we should probably use the babel package here.
%
%    \begin{macrocode}
\newcommand{\acknowledgname}{Acknowledgments}
\newcommand{\prefacename}{Preface}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\listfigurename}{List of Figures}
\renewcommand{\listtablename}{List of Tables}
%bibliography:
%-- the heading "Literature Cited" may be used if it only contains references
%actually cited
\renewcommand{\bibname}{Bibliography}
\renewcommand{\indexname}{Index}
\renewcommand{\figurename}{Figure}
\renewcommand{\tablename}{Table}
\renewcommand{\chaptername}{Chapter}
\renewcommand{\appendixname}{Appendix}
\renewcommand{\partname}{Part}
\renewcommand{\abstractname}{Abstract}
\renewcommand{\acknowledgname}{Acknowledgments}
%    \end{macrocode}
%
%-- if dissertation is divided into "Parts" then each new part designation should
%appear on a separate cover page. numbering for chapters does not begin anew for
%each part.
%
% The style guide has the following requirements for chapter headings:
% \begin{itemize}
%   \item chapter titles should be centered and consistently use the same size
%         and style of font
%   \item no cover pages, just center the title of the appendix on the first
%         page
%   \item if there is only one appendix it must be titled "Appendix", not
%         "Appendix A"
% \end{itemize}
% FIXME: address "Appendix A" issue
%    \begin{macrocode}
\renewcommand{\@makechapterhead}[1]{
    \begin{Large}
    \begin{bf}
    \begin{singlespacing}
    \begin{center}
        \MakeUppercase{\@chapapp}~\thechapter\par
        \MakeUppercase{#1}\par
        ~\par
    \end{center}
    \end{singlespacing}
    \end{bf}
    \end{Large}
}
\renewcommand{\@makeschapterhead}[1]{
    \begin{Large}
    \begin{bf}
    \begin{singlespacing}
    \begin{center}
        \MakeUppercase{#1}\par
        ~\par
    \end{center}
    \end{singlespacing}
    \end{bf}
    \end{Large}
}
%    \end{macrocode}
% \begin{macro}{\degreemonth}
% The month the degree will be officially conferred, capitalized normally. The
% default month is May since most students graduate at the end of the Spring
% semester.
%    \begin{macrocode}
\newcommand{\@degreemonth}{May}
\newcommand{\degreemonth}[1]{\renewcommand{\@degreemonth}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\degreeyear}
% The year the degree will be officially conferred.
%    \begin{macrocode}
\newcommand{\@degreeyear}{2013}
\newcommand{\degreeyear}[1]{\renewcommand{\@degreeyear}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\degree}
% The full (unabbreviated) name of the degree, capitalized normally.
%    \begin{macrocode}
\newcommand{\@degree}{Master of Science}
\newcommand{\degree}[1]{\renewcommand{\@degree}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\versionnum}
% The version of this draft only appears when in draft mode or a proposal.
%    \begin{macrocode}
\newcommand{\@versionnum}{1.0.0}
\newcommand{\versionnum}[1]{\renewcommand{\@versionnum}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\chair}
% The name of your committee's chair.
%    \begin{macrocode}
\newcommand{\@chair}{No Such Person}
\newcommand{\chair}[1]{\renewcommand{\@chair}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\othermembers}
% The names of your other committee members, one per line.
%    \begin{macrocode}
\newcommand{\@othermembers}{}
\newcommand{\othermembers}[1]{\renewcommand{\@othermembers}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\field}
% The name of your degree's field (e.g., Psychology, Computer Science),
% capitalized normally.
%    \begin{macrocode}
\newcommand{\@field}{}
\newcommand{\field}[1]{\renewcommand{\@field}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\subfield}
% The name of your degree's subfield (e.g., Computer Science (Bioinformatics)),
% capitalized normally.
%    \begin{macrocode}
\newcommand{\@subfield}{}
\newcommand{\subfield}[1]{\renewcommand{\@subfield}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\keywords}
% Four to six optional keywords or short key phrases that could be used as
% search terms to find your thesis or dissertation during a library catalog
% or web search.
%    \begin{macrocode}
\newcommand{\@keywords}{}
\newcommand{\keywords}[1]{\renewcommand{\@keywords}{%
    \ifthenelse{\equal{#1}{}}%
    {}%
    {Keywords: #1}%
}}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{frontmatter}
% The FRONTMATTER environment makes sure that page numbering is set
% correctly (roman, lower-case, starting at 2) for the front matter.
% It also resets page-numbering for
% the remainder of the dissertation (arabic, starting at 1).
% FIXME: the book class provides this functionality, perhaps we should use book
% instead of report?
%
%    \begin{macrocode}
\newenvironment{frontmatter}{
    \pagenumbering{roman}
    \setcounter{page}{2}
}{
    \pagenumbering{arabic}
    \setcounter{page}{1}
}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\maketitle}
% This macro outputs the complete title page. It requires all the above macros.
% Based on the options provided, it will customize the title page: thesis vs.
% dissertation, proposal vs. actual.
%
% The following items must be included on the title
% page~\cite[p. 5--6]{uhthesisstyle2010}:
% \begin{itemize}
%   \item an `okina before the final "i" in Hawai`i
%   \item a kahak{\=o} over the `a' (e.g. {\=a}) in M{\=a}noa
%   \item name of the author
%   \item degree being awarded
%   \item field of study
%   \item Specializations are generally not permitted on the title page.
%    The only specializations that may be included, with permission of the
%    graduate program, are: ``Ecology, Evolution and Conservation Biology'',
%    ``Marine Biology'', ``Neurosciences'',
%    ``Japanese, Korean, or Chinese in East Asian Languages'', ``Tropical
%    Medicine in Biomedical Sciences'' in parenthesis after field.
%   \item the author's graduation month (December, May, or August) and year.
%    Do not use the date you completed or turned in the thesis/dissertation.
%   \item committee members names, University representative (outside member)
%   is usually last
%   \item Titles such as Dr. or Ph.D. for committee members or for yourself
%    are not included. However, the chair should be designated by the word
%    "chairperson."
%   \item Optionally, you can list four to six keywords or short key phrases
%    that could be used as search terms to find your thesis or dissertation
%    during a library catalog or web search.
% \end{itemize}
%
% \begin{macrocode}
\newcommand{\@papertype}{}
\ifthenelse{\boolean{\@thesisp}}{
    \renewcommand{\@papertype}{Thesis}
}{
    \renewcommand{\@papertype}{Dissertation}
}
\renewcommand{\maketitle}{
    \thispagestyle{empty}
    \large
    \begin{singlespacing}
    \begin{center}
        \null\vspace{3ex}\par
        \MakeUppercase{\@title}\par
        \vspace{1in}\par
        \ifthenelse{\boolean{\@proposalp}}{
            A \MakeUppercase{\@papertype} PROPOSAL SUBMITTED TO MY COMMITTEE\par
        }{
            A \MakeUppercase{\@papertype} SUBMITTED TO THE GRADUATE DIVISION OF THE\par
            UNIVERSITY OF HAWAI`I AT M{\=A}NOA%
        }
        IN PARTIAL FULFILLMENT\par
        OF THE REQUIREMENTS FOR THE DEGREE OF\par
        \vspace{2ex}\par
        \MakeUppercase{\@degree}\par
        \vspace{2ex}\par
        IN\par
        \vspace{2ex}\par
        \MakeUppercase{\@field}
        \ifthenelse{\equal{\@subfield}{}}{}{(\MakeUppercase{\@subfield})}\par
        \vspace{2ex}\par
        \ifthenelse{\boolean{\@proposalp}}{
            \par
        }{
            \vspace{1ex}\par
            \MakeUppercase{\@degreemonth~\@degreeyear}\par
        }
        \vfill\par
        By\par
        \vspace{1ex}\par
        \@author\par
        \vspace{2ex}\par
        \@papertype~Committee:\par
        \vspace{1ex}\par
        \@chair, Chairperson\par
        \@othermembers\par
        \vspace{3ex}\par
        \@keywords\par
        \ifthenelse{\boolean{\@proposalp}\or\boolean{\@draftp}}{
            \vspace{2ex}\par
            \today\par
            Version \@versionnum
        }{}
    \end{center}
    \end{singlespacing}
    \normalsize
    \cleardoublepage
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\copyrightpage}
% While it's technically optional, you probably want a copyright page.
% This is a macro, not an environment, because it can be generated
% from the degreeyear macro.
%    \begin{macrocode}
\newcommand{\copyrightpage}{
    \large
        \null\vspace{0.45\textheight}\par
        {\centering
        Copyright \copyright{} {\@degreeyear} by \par
        \@author\par
        }
    \normalsize
    \cleardoublepage
}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{abstract}
% The ABSTRACT environment allows for multi-page abstracts.
%abstract page:
% \begin{itemize}
%   \item not required for thesis, required for dissertation
%   \item title "ABSTRACT"
%   \item thesis abstract no more than 150 wds, dissertation no more than 350
%   \item 1.5 spaced
% \end{itemize}
% FIXME: really should be able to check for presence of abs in dissertation
% FIXME: any way to generate a warning if word count is exceeded?
%    \begin{macrocode}
\renewenvironment{abstract}{
    \chapter*{\abstractname}
    \addcontentsline{toc}{chapter}{\abstractname}
}{
    \cleardoublepage
}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{dedication}
% The dedication environment just makes sure the dedication gets its
% own page.
%    \begin{macrocode}
\newenvironment{dedication}{}{
    \cleardoublepage
}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{acknowledgments}
% The acknowledgments environment puts a large, bold, centered 
% "Acknowledgments" label at the top of the page.
%acknowledgement page:
%-- do not show author's name or date
%-- should show up in toc
%    \begin{macrocode}
\newenvironment{acknowledgments}{
    \chapter*{\acknowledgname}
    \addcontentsline{toc}{chapter}{\acknowledgname}
}{
    \cleardoublepage
}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{preface}
% The preface environment just makes sure the preface gets its own page.
%    \begin{macrocode}
\newenvironment{preface}{
    \chapter*{\prefacename}
    \addcontentsline{toc}{chapter}{\prefacename}
}{
    \cleardoublepage
}
%    \end{macrocode}
% \end{environment}
%
%table of contents:
% \begin{itemize}
%   \item includes acknowledgements, abstract, list of tables, list of figures, list of
%         abbreviations and/or symbols, appendices, bibliography, and major sections of
%         the text, does not list title page, or dedication
%   \item must have dot leaders between end of heading and page number
%   \item word headings in toc must match those in the text precisely
%   \item each new sub-level must be indented to distinguish it from the previous level
% \end{itemize}
%
%    \begin{macrocode}
\RequirePackage[nottoc]{tocbibind}
\RequirePackage[titles]{tocloft}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
%    \end{macrocode}
% While the tocloft package affords the ability to customize the table of
% contents, it does do two annoying things: it changes the commands to generate
% the table of contents, list of tables, and list of figures so that they no
% longer automatically generate page breaks and it uses AtBeginDocument to renew
% the commands, which means that to add the page breaks back in we must also use
% AtBeginDocument \emph{after} including the tocloft package.
%    \begin{macrocode}
\AtBeginDocument{
    \let\origtableofcontents\tableofcontents
    \renewcommand{\tableofcontents}{
        \begin{singlespacing}
            \setlength{\parskip}{\baselineskip}
            \setlength{\cftbeforechapskip}{0pt}
            \origtableofcontents
        \end{singlespacing}
        \cleardoublepage
    }
    \let\origlistoftables\listoftables
    \renewcommand{\listoftables}{
        \begin{singlespacing}
            \setlength{\parskip}{\baselineskip}
            \origlistoftables
        \end{singlespacing}
        \cleardoublepage
    }
    \let\origlistoffigures\listoffigures
    \renewcommand{\listoffigures}{
        \begin{singlespacing}
            \setlength{\parskip}{\baselineskip}
            \setlength{\cftbeforechapskip}{0pt}
            \origlistoffigures
        \end{singlespacing}
        \cleardoublepage
    }
}
%    \end{macrocode}
%
%list of tables:
%-- tables numbered using arabic numerals
%-- titles may be shorter than they appear in the text so long as they are not
%misleading
%-- tables may either be numbered consecutively starting with 1, or using chapter
%number . index
%-- single space within titles longer than one line, but double space between
%entries
%-- requirements are otherwise the same as for the table of contents
%
%list of figures/etc:
%-- figure numbers are done the same as table numbers, plate numbers with capital
%roman numerals
%-- if there are both figures and plates arrange them in separate lists
%-- requirements are otherwise the same as for list of tables
%
% \bibliographystyle{plain}
% \bibliography{uhthesis}
%
% \Finale
\endinput
